<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>~/ntl-11.4.2/doc/mat_lzz_pE.cpp.html</title>
<meta name="Generator" content="Vim/8.0">
<meta name="plugin-version" content="vim7.4_v2">
<meta name="syntax" content="cpp">
<meta name="settings" content="use_css,pre_wrap,no_foldcolumn,expand_tabs,prevent_copy=">
<meta name="colorscheme" content="macvim">
<style type="text/css">
<!--
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffffff; }
body { font-family: monospace; color: #000000; background-color: #ffffff; }
* { font-size: 1em; }
.String { color: #4a708b; }
.PreProc { color: #1874cd; }
.Statement { color: #b03060; font-weight: bold; }
.Comment { color: #0000ee; font-style: italic; }
.Type { color: #008b00; font-weight: bold; }
-->
</style>

<script type='text/javascript'>
<!--

-->
</script>
</head>
<body>
<pre id='vimCodeElement'>

<span class="Comment">/*</span><span class="Comment">*************************************************************************\</span>

<span class="Comment">MODULE: mat_zz_pE</span>

<span class="Comment">SUMMARY:</span>

<span class="Comment">Defines the class mat_zz_pE.</span>

<span class="Comment">\*************************************************************************</span><span class="Comment">*/</span>


<span class="PreProc">#include </span><span class="String">&lt;NTL/matrix.h&gt;</span>
<span class="PreProc">#include </span><span class="String">&lt;NTL/vec_vec_lzz_pE.h&gt;</span>


<span class="Type">typedef</span> Mat&lt;zz_pE&gt; mat_zz_pE; <span class="Comment">// backward compatibility</span>

<span class="Type">void</span> add(mat_zz_pE&amp; X, <span class="Type">const</span> mat_zz_pE&amp; A, <span class="Type">const</span> mat_zz_pE&amp; B);
<span class="Comment">// X = A + B</span>

<span class="Type">void</span> sub(mat_zz_pE&amp; X, <span class="Type">const</span> mat_zz_pE&amp; A, <span class="Type">const</span> mat_zz_pE&amp; B);
<span class="Comment">// X = A - B</span>

<span class="Type">void</span> negate(mat_zz_pE&amp; X, <span class="Type">const</span> mat_zz_pE&amp; A);
<span class="Comment">// X = - A</span>

<span class="Type">void</span> mul(mat_zz_pE&amp; X, <span class="Type">const</span> mat_zz_pE&amp; A, <span class="Type">const</span> mat_zz_pE&amp; B);
<span class="Comment">// X = A * B</span>

<span class="Type">void</span> mul(vec_zz_pE&amp; x, <span class="Type">const</span> mat_zz_pE&amp; A, <span class="Type">const</span> vec_zz_pE&amp; b);
<span class="Comment">// x = A * b</span>

<span class="Type">void</span> mul(vec_zz_pE&amp; x, <span class="Type">const</span> vec_zz_pE&amp; a, <span class="Type">const</span> mat_zz_pE&amp; B);
<span class="Comment">// x = a * B</span>

<span class="Type">void</span> mul(mat_zz_pE&amp; X, <span class="Type">const</span> mat_zz_pE&amp; A, <span class="Type">const</span> zz_pE&amp; b);
<span class="Type">void</span> mul(mat_zz_pE&amp; X, <span class="Type">const</span> mat_zz_pE&amp; A, <span class="Type">const</span> zz_p&amp; b);
<span class="Type">void</span> mul(mat_zz_pE&amp; X, <span class="Type">const</span> mat_zz_pE&amp; A, <span class="Type">long</span> b);
<span class="Comment">// X = A * b</span>

<span class="Type">void</span> mul(mat_zz_pE&amp; X, <span class="Type">const</span> zz_pE&amp; a, <span class="Type">const</span> mat_zz_pE&amp; B);
<span class="Type">void</span> mul(mat_zz_pE&amp; X, <span class="Type">const</span> zz_p&amp; a, <span class="Type">const</span> mat_zz_pE&amp; B);
<span class="Type">void</span> mul(mat_zz_pE&amp; X, <span class="Type">long</span> a, <span class="Type">const</span> mat_zz_pE&amp; B);
<span class="Comment">// X = a * B</span>


<span class="Type">void</span> determinant(zz_pE&amp; d, <span class="Type">const</span> mat_zz_pE&amp; A);
zz_pE determinant(<span class="Type">const</span> mat_zz_pE&amp; a);
<span class="Comment">// d = determinant(A)</span>


<span class="Type">void</span> transpose(mat_zz_pE&amp; X, <span class="Type">const</span> mat_zz_pE&amp; A);
mat_zz_pE transpose(<span class="Type">const</span> mat_zz_pE&amp; A);
<span class="Comment">// X = transpose of A</span>

<span class="Type">void</span> solve(zz_pE&amp; d, vec_zz_pE&amp; x, <span class="Type">const</span> mat_zz_pE&amp; A, <span class="Type">const</span> vec_zz_pE&amp; b);
<span class="Comment">// A is an n x n matrix, b is a length n vector.  Computes d =</span>
<span class="Comment">// determinant(A).  If d != 0, solves x*A = b.</span>

<span class="Type">void</span> solve(zz_pE&amp; d, <span class="Type">const</span> mat_zz_pE&amp; A, vec_zz_pE&amp; x, <span class="Type">const</span> vec_zz_pE&amp; b);
<span class="Comment">// A is an n x n matrix, b is a length n vector.  Computes d = determinant(A).</span>
<span class="Comment">// If d != 0, solves A*x = b (so x and b are treated as a column vectors).</span>

<span class="Type">void</span> inv(zz_pE&amp; d, mat_zz_pE&amp; X, <span class="Type">const</span> mat_zz_pE&amp; A);
<span class="Comment">// A is an n x n matrix.  Computes d = determinant(A).  If d != 0,</span>
<span class="Comment">// computes X = A^{-1}.</span>

<span class="Type">void</span> sqr(mat_zz_pE&amp; X, <span class="Type">const</span> mat_zz_pE&amp; A);
mat_zz_pE sqr(<span class="Type">const</span> mat_zz_pE&amp; A);
<span class="Comment">// X = A*A   </span>

<span class="Type">void</span> inv(mat_zz_pE&amp; X, <span class="Type">const</span> mat_zz_pE&amp; A);
mat_zz_pE inv(<span class="Type">const</span> mat_zz_pE&amp; A);
<span class="Comment">// X = A^{-1}; error is raised if A is  singular</span>

<span class="Type">void</span> power(mat_zz_pE&amp; X, <span class="Type">const</span> mat_zz_pE&amp; A, <span class="Type">const</span> ZZ&amp; e);
mat_zz_pE power(<span class="Type">const</span> mat_zz_pE&amp; A, <span class="Type">const</span> ZZ&amp; e);

<span class="Type">void</span> power(mat_zz_pE&amp; X, <span class="Type">const</span> mat_zz_pE&amp; A, <span class="Type">long</span> e);
mat_zz_pE power(<span class="Type">const</span> mat_zz_pE&amp; A, <span class="Type">long</span> e);
<span class="Comment">// X = A^e; e may be negative (in which case A must be nonsingular).</span>

<span class="Type">void</span> ident(mat_zz_pE&amp; X, <span class="Type">long</span> n);
mat_zz_pE ident_mat_zz_pE(<span class="Type">long</span> n);
<span class="Comment">// X = n x n identity matrix</span>

<span class="Type">long</span> IsIdent(<span class="Type">const</span> mat_zz_pE&amp; A, <span class="Type">long</span> n);
<span class="Comment">// test if A is the n x n identity matrix</span>

<span class="Type">void</span> diag(mat_zz_pE&amp; X, <span class="Type">long</span> n, <span class="Type">const</span> zz_pE&amp; d);
mat_zz_pE diag(<span class="Type">long</span> n, <span class="Type">const</span> zz_pE&amp; d);
<span class="Comment">// X = n x n diagonal matrix with d on diagonal</span>

<span class="Type">long</span> IsDiag(<span class="Type">const</span> mat_zz_pE&amp; A, <span class="Type">long</span> n, <span class="Type">const</span> zz_pE&amp; d);
<span class="Comment">// test if X is an  n x n diagonal matrix with d on diagonal</span>


<span class="Type">void</span> random(mat_zz_pE&amp; x, <span class="Type">long</span> n, <span class="Type">long</span> m);  <span class="Comment">// x = random n x m matrix</span>
mat_zz_pE random_mat_zz_pE(<span class="Type">long</span> n, <span class="Type">long</span> m);




<span class="Type">long</span> gauss(mat_zz_pE&amp; M);
<span class="Type">long</span> gauss(mat_zz_pE&amp; M, <span class="Type">long</span> w);
<span class="Comment">// Performs unitary row operations so as to bring M into row echelon</span>
<span class="Comment">// form.  If the optional argument w is supplied, stops when first w</span>
<span class="Comment">// columns are in echelon form.  The return value is the rank (or the</span>
<span class="Comment">// rank of the first w columns).</span>

<span class="Type">void</span> image(mat_zz_pE&amp; X, <span class="Type">const</span> mat_zz_pE&amp; A);
<span class="Comment">// The rows of X are computed as basis of A's row space.  X is is row</span>
<span class="Comment">// echelon form</span>

<span class="Type">void</span> kernel(mat_zz_pE&amp; X, <span class="Type">const</span> mat_zz_pE&amp; A);
<span class="Comment">// Computes a basis for the kernel of the map x -&gt; x*A. where x is a</span>
<span class="Comment">// row vector.</span>



<span class="Comment">// miscellaneous:</span>

<span class="Type">void</span> clear(mat_zz_pE&amp; a);
<span class="Comment">// x = 0 (dimension unchanged)</span>

<span class="Type">long</span> IsZero(<span class="Type">const</span> mat_zz_pE&amp; a);
<span class="Comment">// test if a is the zero matrix (any dimension)</span>


<span class="Comment">// operator notation:</span>

mat_zz_pE <span class="Statement">operator</span>+(<span class="Type">const</span> mat_zz_pE&amp; a, <span class="Type">const</span> mat_zz_pE&amp; b);
mat_zz_pE <span class="Statement">operator</span>-(<span class="Type">const</span> mat_zz_pE&amp; a, <span class="Type">const</span> mat_zz_pE&amp; b);
mat_zz_pE <span class="Statement">operator</span>*(<span class="Type">const</span> mat_zz_pE&amp; a, <span class="Type">const</span> mat_zz_pE&amp; b);

mat_zz_pE <span class="Statement">operator</span>-(<span class="Type">const</span> mat_zz_pE&amp; a);


<span class="Comment">// matrix/scalar multiplication:</span>

mat_zz_pE <span class="Statement">operator</span>*(<span class="Type">const</span> mat_zz_pE&amp; a, <span class="Type">const</span> zz_pE&amp; b);
mat_zz_pE <span class="Statement">operator</span>*(<span class="Type">const</span> mat_zz_pE&amp; a, <span class="Type">const</span> zz_p&amp; b);
mat_zz_pE <span class="Statement">operator</span>*(<span class="Type">const</span> mat_zz_pE&amp; a, <span class="Type">long</span> b);

mat_zz_pE <span class="Statement">operator</span>*(<span class="Type">const</span> zz_pE&amp; a, <span class="Type">const</span> mat_zz_pE&amp; b);
mat_zz_pE <span class="Statement">operator</span>*(<span class="Type">const</span> zz_p&amp; a, <span class="Type">const</span> mat_zz_pE&amp; b);
mat_zz_pE <span class="Statement">operator</span>*(<span class="Type">long</span> a, <span class="Type">const</span> mat_zz_pE&amp; b);

<span class="Comment">// matrix/vector multiplication:</span>

vec_zz_pE <span class="Statement">operator</span>*(<span class="Type">const</span> mat_zz_pE&amp; a, <span class="Type">const</span> vec_zz_pE&amp; b);

vec_zz_pE <span class="Statement">operator</span>*(<span class="Type">const</span> vec_zz_pE&amp; a, <span class="Type">const</span> mat_zz_pE&amp; b);


<span class="Comment">// assignment operator notation:</span>

mat_zz_pE&amp; <span class="Statement">operator</span>+=(mat_zz_pE&amp; x, <span class="Type">const</span> mat_zz_pE&amp; a);
mat_zz_pE&amp; <span class="Statement">operator</span>-=(mat_zz_pE&amp; x, <span class="Type">const</span> mat_zz_pE&amp; a);
mat_zz_pE&amp; <span class="Statement">operator</span>*=(mat_zz_pE&amp; x, <span class="Type">const</span> mat_zz_pE&amp; a);

mat_zz_pE&amp; <span class="Statement">operator</span>*=(mat_zz_pE&amp; x, <span class="Type">const</span> zz_pE&amp; a);
mat_zz_pE&amp; <span class="Statement">operator</span>*=(mat_zz_pE&amp; x, <span class="Type">const</span> zz_p&amp; a);
mat_zz_pE&amp; <span class="Statement">operator</span>*=(mat_zz_pE&amp; x, <span class="Type">long</span> a);

vec_zz_pE&amp; <span class="Statement">operator</span>*=(vec_zz_pE&amp; x, <span class="Type">const</span> mat_zz_pE&amp; a);



</pre>
</body>
</html>
<!-- vim: set foldmethod=manual : -->
